- name: d8.monitoring-application.warnings
  rules:
  - alert: D8OldPrometheusTargetFormat
    expr: |
      max(d8_monitoring_applications_old_prometheus_target_total{job="deckhouse"} > 0)
    labels:
      severity_level: "6"
    annotations:
      plk_protocol_version: "1"
      plk_markup_format: "markdown"
      plk_create_group_if_not_exists__d8_deprecated_prometheus_functionality_in_used: "D8DeprecatedPrometheusFunctionalityIsUsed,prometheus=deckhouse,kubernetes=~kubernetes"
      plk_grouped_by__d8_deprecated_prometheus_functionality_in_used: "D8DeprecatedPrometheusFunctionalityIsUsed,prometheus=deckhouse,kubernetes=~kubernetes"
      description: |-
        Services with the `prometheus-target` label are used to collect metrics in the cluster.

        Use the following command to filter them: `kubectl get service --all-namespaces --show-labels | grep prometheus-target`

        Note that the label format has changed. You need to replace the `prometheus-target` label with `prometheus.deckhouse.io/target`.
      summary: >
        Services with the `prometheus-target` label are used to collect metrics in the cluster.
